Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

plumbing: use sliding window in delta calculations, like git CL #565

Merged
merged 1 commit into from
Aug 28, 2017

Conversation

strib
Copy link
Contributor

@strib strib commented Aug 25, 2017

This sets a default sliding window of 10 for the delta calculation, just like git command line:
https://git-scm.com/docs/git-pack-objects#git-pack-objects---windowltngt

For a big-ish repo with 35K objects (17K commits), this reduced the time for calling deltaSelection.walk during a push from more than 14 minutes to about a minute.

strib added a commit to keybase/kbfs that referenced this pull request Aug 25, 2017
Compared to the v4 branch we were using before, master branch seems to
fix a few bugs and bring the time for pushing the KBFS repo from hours
to about 25 minutes.  With the following optimizations, I got that
time down to less than 3 minutes.

* src-d/go-git#564
* src-d/go-git#565

I suspect there are still lots more optimizations that can be done.  I
don't think there are many users of Push in this project.
@codecov
Copy link

codecov bot commented Aug 25, 2017

Codecov Report

Merging #565 into master will decrease coverage by 0.59%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #565     +/-   ##
=========================================
- Coverage   77.98%   77.38%   -0.6%     
=========================================
  Files         129      129             
  Lines        9845     9845             
=========================================
- Hits         7678     7619     -59     
- Misses       1328     1400     +72     
+ Partials      839      826     -13
Impacted Files Coverage Δ
plumbing/format/packfile/delta_selector.go 79.52% <100%> (ø) ⬆️
plumbing/transport/ssh/common.go 20.54% <0%> (-45.21%) ⬇️
plumbing/transport/ssh/auth_method.go 31.57% <0%> (-22.81%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bff1d06...cdddb7a. Read the comment docs.

strib added a commit to keybase/kbfs that referenced this pull request Aug 26, 2017
Compared to the v4 branch we were using before, master branch seems to
fix a few bugs and bring the time for pushing the KBFS repo from hours
to about 25 minutes.  With the following optimizations, I got that
time down to less than 3 minutes.

* src-d/go-git#564
* src-d/go-git#565

I suspect there are still lots more optimizations that can be done.  I
don't think there are many users of Push in this project.
strib added a commit to keybase/kbfs that referenced this pull request Aug 26, 2017
Compared to the v4 branch we were using before, master branch seems to
fix a few bugs and bring the time for pushing the KBFS repo from hours
to about 25 minutes.  With the following optimizations, I got that
time down to less than 3 minutes.

* src-d/go-git#564
* src-d/go-git#565

I suspect there are still lots more optimizations that can be done.  I
don't think there are many users of Push in this project.
strib added a commit to keybase/kbfs that referenced this pull request Aug 26, 2017
Compared to the v4 branch we were using before, master branch seems to
fix a few bugs and bring the time for pushing the KBFS repo from hours
to about 25 minutes.  With the following optimizations, I got that
time down to less than 3 minutes.

* src-d/go-git#564
* src-d/go-git#565

I suspect there are still lots more optimizations that can be done.  I
don't think there are many users of Push in this project.
@mcuadros mcuadros requested a review from erizocosmico August 27, 2017 21:47
@mcuadros
Copy link
Contributor

Any chance to cover this with a test?

Copy link
Contributor

@erizocosmico erizocosmico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once the tests are added as requested by @mcuadros

This sets a default sliding window of 10 for the delta calculation,
just like git CL:
https://git-scm.com/docs/git-pack-objects#git-pack-objects---windowltngt

For a big-ish repo with 35K objects (17K commits), this reduced the
time for calling `deltaSelection.walk` during a push from more than 14
minutes to about a minute.
@strib strib force-pushed the delta-sliding-window branch from 9801511 to cdddb7a Compare August 28, 2017 17:10
@strib
Copy link
Contributor Author

strib commented Aug 28, 2017

Thanks @mcuadros and @erizocosmico, added a simple test. Ready for merge, I think.

@mcuadros mcuadros merged commit cb32722 into src-d:master Aug 28, 2017
@strib strib deleted the delta-sliding-window branch August 28, 2017 18:40
strib added a commit to keybase/kbfs that referenced this pull request Aug 28, 2017
Compared to the v4 branch we were using before, master branch seems to
fix a few bugs and bring the time for pushing the KBFS repo from hours
to about 25 minutes.  With the following optimizations, I got that
time down to less than 3 minutes.

* src-d/go-git#564
* src-d/go-git#565

I suspect there are still lots more optimizations that can be done.  I
don't think there are many users of Push in this project.
strib added a commit to keybase/kbfs that referenced this pull request Aug 28, 2017
Compared to the v4 branch we were using before, master branch seems to
fix a few bugs and bring the time for pushing the KBFS repo from hours
to about 25 minutes.  With the following optimizations, I got that
time down to less than 3 minutes.

* src-d/go-git#564
* src-d/go-git#565

I suspect there are still lots more optimizations that can be done.  I
don't think there are many users of Push in this project.
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants